<template>
	<div class="useropinion">
		<div class="useropinionTitle">我的消息</div>
		<div class="mynew">
			<table>
				<tr class="mynewTh">
					<th>标题</th>
					<th>发送时间</th>
					<th>状态</th>
					<th>操作</th>
				</tr>
				<tr v-for="good in goods" v-bind:key="good.goodid">
					<td>{{good.text}}</td>
					<td>{{good.time}}</td>
					<td>{{goodstate}}</td>
					<td><router-link to="" class="mynewlook">查看</router-link><router-link to="">编辑</router-link></td>
				</tr>
			</table>
		</div>
	</div>
</template>

<script>
	export default{
		data(){
			return{
				goods:null,
				goodstate:'未查看'
			}
		},
		created(){
			var _this=this;
			var userphone=localStorage.getItem('userphone');
			this.$axios.post("http://localhost:3000/userinfor/usernew",{
				userphone:userphone
			}).then(function(response){
				window.console.log(response)
				var list=response.data;
				if(list.code==200){
					_this.goods=list.text;
				}
			})
		}
	}
</script>

<style>
	.mynew{
		width: 90%;
		margin-top: 20px;
		margin-left: 5%;
	}
	.mynew{
		border: 1px solid #c1c1c1;
	}
	.mynew table{
		width: 100%;
		border-collapse:collapse; 
		border-spacing:0px; 
	}
	.mynew table tr{
		height:46px ;
		width: 100%;
		border-bottom: 1px solid #c1c1c1;
		
	}
	.mynew table tr th:nth-of-type(1){
		width: 50%;
		text-align: center;
	}
	.mynew table tr th:nth-of-type(2){
		width: 25%;
		text-align: center;
	}
	.mynew table tr th:nth-of-type(3){
		width: 10%;
		text-align: center;
	}
	.mynew table tr th:nth-of-type(4){
		width: 15%;
		text-align: center;
	}
	.mynew table tr td:nth-of-type(1){
		width: 50%;
		text-align: center;
	}
	.mynew table tr td:nth-of-type(2){
		width: 25%;
		text-align: center;
	}
	.mynew table tr td:nth-of-type(3){
		width: 10%;
		text-align: center;
	}
	.mynew table tr td:nth-of-type(4){
		width: 15%;
		text-align: center;
	}
	.mynew table .mynewTh{
		background: #c1c1c1;
	}
	.mynew a{
		color: #2E9E3B;
	}
	.mynewlook{
		border-right:1px solid #c1c1c1;
		margin-right: 5px;
	}
</style>
